 <!--header-->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="./Public/home/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/home/css/list.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/home/css/header.css"/>
		<link rel="stylesheet" type="text/css" href="./Public/home/css/content.css"/>
		<script src="./Public/home/js/jquery-1.7.2.min.js"></script>
		<script src="./Public/home/js/style.js"></script>
		<script src="./Public/home/js/area.js"></script>
		<!--上传插件-->
		 <script src="./Public/uploadify/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
	    <script src="./Public/uploadify/jquery.uploadify.min.js" type="text/javascript" charset="utf-8"></script>
	    <link rel="stylesheet" type="text/css" href="./Public/uploadify/uploadify.css"/>
	</head>
	<body>
	<div id="edit-password"></div>
	<div class="edit-box">
		<div class="edit-box-title">修改密码<span class="del">x</span></div>
		<div class="edit-box-content">
			<form action="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=Member&a=edit" method="post">
				<span>旧 密 码：</span><input type="password" name="oldpassword" placeholder="请输入旧密码" /><br />
				<span> 密 码：</span><input type="password" name="password" placeholder="请输入新密码" /><br />
				<span>确认密码：</span><input type="password" name="repassword" placeholder="请确认新密码"/><br />	
				<span>验证码：</span><input type="text" name="code" placeholder="请输入验证码" style="width: 160px;"/><img src="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=Member&a=code" style="position: relative;top:10px;margin-left: 5px;"/>
				<input type="hidden" name="uid" value="<div style="border: 1px solid #990000;padding-left: 20px;margin: 10px;font-family: Monaco,Menlo,Consolas,monospace;">
    <h3 style="font-size: 18px;margin: 20px 0;">Undefined index: nickuser</h3>
    <p style="font-size: 14px;margin: 15px 0;">
        Severity: E_NOTICE    </p>
    <p>
        File: G:\wamp\www\geren\portfolio\360shop\Storage\view\compile\c692596aff905c2d3284633858932715.php    </p>
    <p>
        Line: 42    </p>
</div>" />
				<input type="submit" value="提交" class="edit-box-btn"/>
			</form>
		</div>
	</div>
	<!--header-->
	<div id="header">
		<div class="header"> 
			<div class="headerTop">
				<div class="headerLeft">
					<h1>
						<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=Index&a=index"><img src="./Public/home/images/logo1_cc09ff8.png"/></a>
					</h1>
				</div>
				<div class="headerRight">
					<ul class="header-car">
						<li class="shop-car">
							<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=Cart&a=index" class="cart-add">购物车(<span>0
               </span>)</a>
						</li>
					</ul>
					<!--搜索-->
					<div class="select">
						<form action="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index" method="post">
							<input type="text" name="select" class="select-box" />
							<input type="submit" value="So索" class="select-btn"/>
						</form>
					</div>
					<ul class="navbar">
						<li><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=Index&a=index" >首页</a></li>
												<li><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=1">手机</a></li>
												<li><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=14">耳机</a></li>
												<li><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=13">能源</a></li>
												<li><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=20">智能硬件</a></li>
												<li><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=18">VR眼镜/车载设备</a></li>
												<li><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=19">存储</a></li>
											</ul>
				</div>
			</div>
			<div class="header-bottom">
				<div class="header-bottom-box">
					<div class="bottom-left-hover">
						<div class="header-bottom-left">全部商品分类</div>
						<ul class="nav-list">
													<li>
								<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=1" class="nav-list-title">手机</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=21">智能机</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=22">商务机</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=24">双卡双待</a>
															</li>
													<li>
								<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=14" class="nav-list-title">耳机</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=25">有线耳机</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=26">蓝牙耳机</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=27">运动耳机</a>
															</li>
													<li>
								<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=13" class="nav-list-title">能源</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=28">电池</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=29">移动电源</a>
															</li>
													<li>
								<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=20" class="nav-list-title">智能硬件</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=43">智能手表</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=30">智能路由器</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=31">随身WIFI</a>
															</li>
													<li>
								<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=18" class="nav-list-title">VR眼镜/车载设备</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=32">VR眼镜</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=33">车载设备</a>
															</li>
													<li>
								<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=19" class="nav-list-title">存储</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=34">内存卡</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=35">U盘</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=36">移动硬盘</a>
															</li>
													<li>
								<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=17" class="nav-list-title">保护</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=39">保护套</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=40">后壳</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=41">贴膜</a>
															</li>
													<li>
								<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=15" class="nav-list-title">手机配件</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=37">充电器</a>
																<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=38">数据线</a>
															</li>
											</ul>
					</div>
					<ul class="header-bottom-right">
						<li class="li-nav">
							<span style="padiving-left: 15px;">网站导航</span>
							<div class="all-list">
																<div><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=1">手机</a></div>
																<div><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=14">耳机</a></div>
																<div><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=13">能源</a></div>
																<div><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=20">智能硬件</a></div>
																<div><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=18">VR眼镜/车载设备</a></div>
																<div><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=19">存储</a></div>
																<div><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=17">保护</a></div>
																<div><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=List&a=index&cid=15">手机配件</a></div>
															</div>
						</li>
												<li>
							<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=Member&a=index">登录</a>
							<a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=Member&a=reg">注册</a>
							<!--<a href="">忘记密码？</a>-->
						</li>
						
               						<li class="order"><a href="http://localhost/geren/portfolio/360shop/index.php?m=Home&c=Presonal&a=order">我的订单</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<!--/header-->
	<!--/header-->
	<script type="text/javascript">
		$(function(){
		$('.shop-style-select a').click(function(){
			$(this).addClass('hover').siblings().removeClass('hover');
			//抓取div的个数
			var divLen=$('.shop-style-select').length;
			//抓取选中的a的个数
			var aLen=$('.shop-style-select .hover').length;
			//alert(aLen);
			if(divLen==aLen){
				var str='';
				$.each($('.shop-style-select .hover'), function() {
					str+=$(this).attr('gaid')+'|';
				});
				$.ajax({
					type:"post",
					url:"<?php echo U('goodsList')?>",
					data:{gaids:str},
					dataType:'json',
					success:function(goodsList){
						var num='';
						var inventory='';
						if(goodsList){
							num+='<span>货号：</span>';
							num+='<span>'+goodsList.number+'</span>';
							inventory+='库存:';
							inventory+='<span class="inventory">'+goodsList.inventory+'</span>';
						}else{
							$('.name-money strong').html((<?php echo $goodsData['shopprice']?>).toFixed(2));
							$('.name-money strong').attr('value',(<?php echo $goodsData['shopprice']?>).toFixed(2));
							inventory+='库存：<span class="inventory">0</span>';
						}
						$('.shop-name-title span').html(num);
						$('.shop-num span').html(inventory);
						money=(goodsList.add*1+<?php echo $goodsData['shopprice']?>*1).toFixed(2);
						$('.name-money strong').html(money);
						$('.name-money strong').attr('value',money);
					}
				});
			}
		});
		//加入购物车
		$('.shop-name-buy .name-car').click(function(){
			//抓取div的个数
			var divLen=$('.shop-style-select').length;
			//抓取选中的a的个数
			var aLen=$('.shop-style-select .hover').length;
			//alert(aLen);
			if(divLen==aLen){
				//取出选择的货品组合
				var str='';
				$.each($('.shop-style-select .hover'), function() {
					str+=$(this).attr('gaid')+'|';
				});
				//取出当前的货品名称
				var name=$('.shop-name-title h1').html();
				//取出当前货品的单价
				var money=$('.name-money strong').html();
				//取出当前货品的库存
				var inventory=$(".shop-num .inventory").html();
				//取出购买数量
				var num=$('.shop-num .goodsNum').attr('value');
				if(inventory==0){
					alert('该货品已售完，请选择其他商品');
				}else{
					$.ajax({
						type:'post',
						url:"<?php echo U('Cart/add')?>",
						data:{arr:{name:name,num:num,price:money,options:str,gid:<?php echo $_GET['gid']?>}},
						dataType:'json',
						success:function(phpData){
							if(phpData.num){
								alert(phpData.massage);
								$('.cart-add span').html(phpData.num);
							}else{
								alert(phpData);
							}
						}
					});
					
				}
			}else{
				alert('请对产品类型进行选择');
			}
		});
	});
	
	</script>
	<!--center-->
	<div id="content">
		<div class="shop-main">
			<div class="shop-left">
				<div class="shop-img">
					<?php foreach ($detailData['dimg'] as $v){?>
					<img src="<?php echo $v?>" alt="" />
					<?php }?>
				</div>
				<div class="shop-bottom">
					<?php foreach ($detailData['dimg'] as $v){?>
					<img src="<?php echo $v?>" alt="" />
					<?php }?>
				</div>
			</div>
			<div class="shop-name">
				<div class="shop-name-title">
					<h1 name='gname'><?php echo $goodsData['gname']?></h1>
					<span></span>
				</div>
				<div class="shop-name-money">
					<div class="name-money">单价：¥<strong name="shopEnd" value="<?php echo $goodsData['shopprice']?>"><?php echo $goodsData['shopprice']?></strong></div>
					<div class="name-money">原价：<span style="text-decoration: line-through;">¥<?php echo $goodsData['makertprice']?></span></div>
				</div>
				
				<div class="shop-name-chenge">
					<?php foreach ($fallTamp as $f){?>
					<div class="shop-style-select">
						<?php echo $f['name']?>：
						<?php foreach ($f['value'] as $ff){?>
						<a href="javascript:;" gaid="<?php echo $ff['gaid']?>"><?php echo $ff['gavalue']?></a>
						<?php }?>
					</div>
					<?php }?>
					<div class="shop-num">购买数量：
						<a href="javascript:;" class="del">-</a>
						<input type="text" class="goodsNum" value="1" readonly="readonly"/>
						<a href="javascript:;" class="add">+</a>
						<span></span>
					</div>
				<div class="save">服务：由<span>" 360手机商城 "</span>直接销售和发货，并提供售后服务</div>
				</div>
				<div class="shop-name-buy">
					<a href="javascript:;" class="name-car">加入购物车</a>
					<a href="javascript:;" class="name-buy">立即购买</a>
					<script type="text/javascript">
						$(function(){
							//立即购买，加入订单
							$('.name-buy').click(function(){
								//抓取div的个数
								var divLen=$('.shop-style-select').length;
								//抓取选中的a的个数
								var aLen=$('.shop-style-select .hover').length;
								//alert(aLen);
								if(divLen==aLen){
									//取出选择的货品组合
									var str='';
									$.each($('.shop-style-select .hover'), function() {
										str+=$(this).attr('gaid')+'|';
									});
									//取出当前的货品名称
									var name=$('.shop-name-title h1').html();
									//取出当前货品的单价
									var money=$('.name-money strong').html();
									//取出当前货品的库存
									var inventory=$(".shop-num .inventory").html();
									//取出购买数量
									var num=$('.shop-num .goodsNum').attr('value');
									var gid=<?php echo $_GET['gid']?>;
									money=money*num;
									if(inventory==0){
										alert('该货品已售完，请选择其他商品');
									}else{
										$.ajax({
											type:"post",
											url:"<?php echo U('Order/addOrder')?>",
											data:{orderData:{gototal:money,goallnum:num}},
											dataType:'json',
											success:function(goid){
												if(goid){
													$.ajax({
														type:"post",
														url:"<?php echo U('Order/olist')?>",
														data:{goodsList:{shop_goodsorder_goid:goid,shop_goods_gid:gid,oltotal:money,olnum:num,options:str}},
														
														success:function(){
															window.location.href="<?php echo U('Order/index')?>";
														}
													});
												}else{
													alert('请登录后在进行操作');
												}
											}
										});
									}
								}else{
									alert('请对产品类型进行选择');
								}
							});
						})
					</script>
					<div><img src="./Public/home/images/convinced.png" alt="" /></div>
				</div>
			</div>
		</div>
	</div>
	<!--/center-->
	<!--detail-->
	<div id="shop-detail">
		<div class="shop-detail-left">
			<div class="detail-title">
				<a href="#goodsDesc" class="cur">产品详情</a>
				<a href="#goodsParam">规格参数</a>
				<a href="#goodsPack">包装清单</a>
			</div>
			<div id="goodsDesc">
				<?php echo $detailData['detail']?>
			</div>
			<div id="goodsParam">
				<h4>规格参数</h4>
				<?php foreach ($attrData as $a){?>
				<div class="param-content">
					<span class="param-content-title"><?php echo $a['taname']?>：</span>
					<span class="param-content-desc"><?php echo $a['gavalue']?></span>
				</div>
				<?php }?>
			</div>
			<div id="goodsPack">
				<div class="goodsPack">包装清单</div>
				<div class="packList"><?php echo $detailData['dlist']?></div>
			</div>
		</div>
		<div class="shop-detail-right">
			<dl>
				<dt>热销榜单</dt>
				<dd>
					<ul>
						<?php foreach ($oneGoodsData as $v){?>
						<li>
							<a href="<?php echo U('Content/index',['gid'=>$v['gid']])?>"><img src="<?php echo $v['pic']?>"/></a>
							<p>
								<a href="<?php echo U('Content/index',['gid'=>$v['gid']])?>"><?php echo $v['gname']?><br />
									<i>¥<?php echo $v['shopprice']?></i>
								</a>
							</p>
						</li>
						<?php }?>
					</ul>
				</dd>
			</dl>
		</div>
	</div>
	<div id="goods-bar">
		<div class="goods-bar-box">
			<div class="goods-span">
				<img src="<?php echo $goodsData['pic']?>" alt="" />
				<p>
				<strong><?php echo $goodsData['gname']?></strong><br />
				<?php echo $goodsData['shopprice']?><span>元</span>
				</p>
			</div>
			<a href="#goodsDesc" class="hover">产品详情</a>
			<a href="#goodsParam">规格参数</a>
			<a href="#goodsPack">包装清单</a>
			<a href="" class="goods-buy">立即购买</a>
		</div>
	</div>
	<!--/detail-->
	<!--footer-->
	<div id="footer">
	<div class="footer">
		<p>法律声明|备案证号：京ICP备11014623号-6    © 版权2012-2020 奇酷互联网络科技(深圳)有限公司</p>
	</div>
</div>
	<!--/footer-->
	</body>
</html>

